refactor: separate PYAUTOFIT_TEST_MODE into distinct PYAUTO_* env vars#1195
Merged
refactor: separate PYAUTOFIT_TEST_MODE into distinct PYAUTO_* env vars#1195
Conversation
Split the catch-all PYAUTOFIT_TEST_MODE into purpose-specific variables: - PYAUTO_TEST_MODE (sampler speedup, levels 0-3) - PYAUTO_SKIP_FIT_OUTPUT (pre/post-fit I/O, VRAM, result text) - PYAUTO_SKIP_VISUALIZATION (fit visualization and plotting) - PYAUTO_SKIP_CHECKS (mesh validation, position resampling, weight thresholds) Also renames: - PYAUTOARRAY_OUTPUT_MODE -> PYAUTO_OUTPUT_MODE - PYAUTO_WORKSPACE_SMALL_DATASETS -> PYAUTO_SMALL_DATASETS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 12, 2026
Collaborator
Author
|
Workspace PR: PyAutoLabs/autofit_workspace#29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update all
PYAUTOFIT_TEST_MODEcall sites to use the new purpose-specific functions fromautoconf.test_mode. Visualization →skip_visualization(), fit I/O →skip_fit_output(), weight thresholds →skip_checks(). Sampler-related sites keep usingtest_mode_level()/is_test_mode()unchanged.Depends on: PyAutoLabs/PyAutoConf#86
API Changes
None — internal changes only. The
autofit.non_linear.test_modere-export module now includes 3 additional symbols (skip_fit_output,skip_visualization,skip_checks).Test Plan
test_initializer.pyupdated to usePYAUTO_TEST_MODEFull API Changes (for automation & release notes)
Added (re-exports)
autofit.non_linear.test_mode.skip_fit_outputautofit.non_linear.test_mode.skip_visualizationautofit.non_linear.test_mode.skip_checksChanged Behaviour
Visualizer.should_visualize()now checksPYAUTO_SKIP_VISUALIZATIONinstead ofPYAUTOFIT_TEST_MODEPYAUTO_SKIP_FIT_OUTPUTinstead oftest_mode_level() >= 2print_vram_use()now checksPYAUTO_SKIP_FIT_OUTPUTinstead oftest_mode_level() >= 2check_likelihood_function()now checksPYAUTO_SKIP_FIT_OUTPUTinstead ofis_test_mode()result_info_from()now checksPYAUTO_SKIP_FIT_OUTPUTinstead oftest_mode_level() >= 2samples_that_exceed_weight_threshold()now checksPYAUTO_SKIP_CHECKSinstead ofis_test_mode()skip_in_test_modedecorator now checksPYAUTO_SKIP_VISUALIZATIONinstead ofis_test_mode()Migration
export PYAUTOFIT_TEST_MODE=2controlled everythingPYAUTO_TEST_MODE=2 PYAUTO_SKIP_FIT_OUTPUT=1 PYAUTO_SKIP_VISUALIZATION=1 PYAUTO_SKIP_CHECKS=1🤖 Generated with Claude Code